/*
 *
 *  *  Copyright (c) 2019-2020, 冷冷 (wangiegie@gmail.com).
 *  *  <p>
 *  *  Licensed under the GNU Lesser General Public License 3.0 (the "License");
 *  *  you may not use this file except in compliance with the License.
 *  *  You may obtain a copy of the License at
 *  *  <p>
 *  * https://www.gnu.org/licenses/lgpl.html
 *  *  <p>
 *  * Unless required by applicable law or agreed to in writing, software
 *  * distributed under the License is distributed on an "AS IS" BASIS,
 *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  * See the License for the specific language governing permissions and
 *  * limitations under the License.
 *
 */
package com.base.pig.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.base.pig.entity.SysDictItem;
import com.base.pig.util.R;


import java.util.List;
import java.util.Map;

/**
 * 字典项
 *
 * @author lengleng
 * @date 2019/03/19
 */
public interface SysDictItemService extends IService<SysDictItem> {

	/**
	 * 删除字典项
	 *
	 * @param id 字典项ID
	 * @return
	 */
	R removeDictItem(Long id);

	/**
	 * 更新字典项
	 *
	 * @param item 字典项
	 * @return
	 */
	R updateDictItem(SysDictItem item);

	/**
	 * 更新字典项
	 *
	 * @param map 字典项
	 * @return
	 */
	R getSysDictItemPage(Map map);

	/**
	 * @Title getSysDictItem
	 * @Description
	 * @param value : 字典项表中value
	 * @param type :  字典项类型
	 * @return com.pig4cloud.pig.admin.api.entity.SysDictItem
	 * @author zhangzhy
	 * @date 2020/4/29 14:13
	 */
	SysDictItem getSysDictItem(String value, String type);

	/**
	 * @Title getDictChildren
	 * @Description
	 * @param type :  字典表中type 字典类型
	 * @return java.util.List
	 * @author zhangzhy
	 * @date 2020/4/30 14:21
	 */
	List getDictChildren(String type);

	/**
	 * @Title getDictOne  查询字典项信息
	 * @Description
	 * @param id : id
     * @param type : 类型
	 * @return com.pig4cloud.pig.admin.api.entity.SysDictItem
	 * @author zhangzhy
	 * @date 2020/5/7 17:34
	 */
	SysDictItem getDictOne(Long id, String type);

	/**
	 * @Title gitDictItemList 查询字典项中设备类型的子项
	 * @Description
	 * @param value :
 	 * @param type :
	 * @return java.util.List
	 * @author zhangzhy
	 * @date 2020/5/13 17:29
	 */
	List getDictItemList(Long value, String type);
}
